package com.jic.market.service;


import com.jic.common.base.vo.PageResult;
import com.jic.common.base.vo.RestResult;
import com.jic.market.entity.PromotionEntity;
import com.jic.market.request.PromotionRequest;
import com.jic.market.request.QueryPromotionListRequest;
import com.jic.market.response.PageResponse;
import com.jic.market.response.PromotionManagerResponse;
import com.jic.market.response.PromotionResponse;

import java.util.List;

/**
 * description: JicMarketPromotionService
 * date: 2020/1/10 14:52
 * author: admin
 * version: 1.0
 */
public interface JicMarketPromotionService {

    PageResponse<PromotionResponse> listByPage(PromotionRequest request);

    /**
     * 添加活动
     *
     * @param request
     * @return
     */
    PromotionResponse addPromotion(PromotionRequest request);

    PromotionResponse detail(PromotionRequest request);

    PromotionEntity queryEntity(String promotionCode);

    void delete(Long id);

    int update(PromotionRequest param);

    Long copy(Long id);

    int updateStatus(PromotionRequest request);

    RestResult reviewPromotion(PromotionRequest request);

    Long updatePromotion(PromotionRequest request);

    /**
     * 根据 主键List 查询促销列表
     * @param idsList
     * @return
     */
    List<PromotionEntity> queryPromotionListByIds(List<Long> idsList);
    /**
     * 添加单品X件优惠
     *
     * @param request
     * @return
     */
    PromotionResponse savePromotionSingleProduct(PromotionRequest request);

    /**
     * 查询单X详情
     *
     * @param id
     * @return
     */
    PromotionManagerResponse queryPromotionDetail(Long id);

    RestResult<Long> deepCopy(PromotionRequest request);

    RestResult<Long> saveTemplate(PromotionRequest request);

    /*
    * 删除单品X件促销优惠*/
    RestResult<Long> delSingleProduct(PromotionRequest request);

    /*
    * 关闭单品X件促销活动*/
    RestResult<Long> closeXofferPromotion(PromotionRequest request);


    RestResult<PageResult<PromotionResponse>> queryPromotionList(QueryPromotionListRequest request);
}
